variance Interface

public interface variance

Module Procedures

private pure function variance_array(x) result(rst)

Computes the sample variance of the values in an array.

The variance computed is the sample variance such that .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

The array of values to analyze.

Return Value real(kind=real64)

Sample variance; fewer than two observations or nonfinite inputs give NaN. An unrepresentable variance gives positive infinity.

private pure function variance_column(x) result(rst)

Computes sample variance using the array implementation on a copy.

Arguments

Type IntentOptional Attributes Name
class(data_column), intent(in) :: x

The input column, unchanged; unallocated storage is treated as empty.

Return Value real(kind=real64)

Sample variance; fewer than two values or nonfinite data give NaN. Unrepresentable results give positive infinity.